//////////////////////////////////////////////////////////////////////////
#pragma once


#include <SFML/System/InputStream.hpp>
#include <string>


namespace FileSystem
{
	class SfmlStream : public sf::InputStream
	{
	public:
		//
		SfmlStream();
		virtual ~SfmlStream();

		//
		static SfmlStream*		Open( const std::string& file );
		static SfmlStream*		Write( const std::string& file );

		//
		virtual sf::Int64 read( void* data, sf::Int64 size ) override;
		virtual sf::Int64 seek( sf::Int64 position ) override;
		virtual sf::Int64 tell() override;
		virtual sf::Int64 getSize() override;
		
	private:
		//
		void*					mHandle;
	};
}
